﻿using System;

using System.Text.RegularExpressions;

namespace KnowledgeSource
{
    public class RemoveForbiddenCharacters: IKnowledgeSource
    {
        public string execute(string input)
        {
            if( input.Length != 0 )
            {
                var result = Regex.Replace(input, @"[^a-zA-Z0-9_. ąęćżźńóśłĄĘĆŻŹŃÓŚŁ]+", "");
                return result;
            }

            throw new ArgumentNullException("RemoveForbiddenCharacters - input is empty string");

        }
    }
}
